Page({
    data: {
        lastX: 0,
        lastY: 0,
        text: "没有滑动"
    },
    handletouchmove: function(t) {
        console.log(t);
        var a = t.touches[0].pageX, s = t.touches[0].pageY;
        console.log(a), console.log(this.data.lastX);
        var e = "";
        a - this.data.lastX < 0 ? e = "向左滑动" : a - this.data.lastX > 0 && (e = "向右滑动"), 
        this.data.lastX = a, this.data.lastY = s, this.setData({
            text: e
        });
    }
});